Scenario #3100: Create Sepa Mandate for Debitor

UseCase Create Sepa Mandate For Debitor => SEPA-Mandate: Test AG

Properties

Required

Given

name value
debitorNumber D-3101000
mandateReference Test AG - main debitor
mandateAgreement 2022-10-12
mandateValidFrom 2024-10-15
bankAccountHolder Test AG - debit bank account
bankAccountIBAN DE02701500000000594937
bankAccountBIC SSKMDEMM

Debitor: Test AG - main debitor

HTTP GET "/api/hs/office/debitors/D-3101000" \
  -H "Authorization: Bearer $HSADMINNG_JWT_BEARER" \
  `# {` \
  `#   "sub" : "uuid<hsh-alex_superuser>"` \
  `# }`
=> status: 200 OK 
{
  "uuid" : "23a905b2-1889-49e6-9ae8-499a678f15ae", // Debitor: D-3101000 - Test AG - main debitor
  "debitorRel" : {
    "uuid" : "a7761701-f682-49e5-b77f-e6147af71fad",
    "anchor" : {
      "uuid" : "1223603d-1a3b-4e0c-a244-027585d22eb2", // Person: Test AG
      "personType" : "LEGAL_PERSON",
      "tradeName" : "Test AG",
      "salutation" : null,
      "title" : null,
      "givenName" : null,
      "familyName" : null
    },
    "holder" : {
      "uuid" : "1223603d-1a3b-4e0c-a244-027585d22eb2", // Person: Test AG
      "personType" : "LEGAL_PERSON",
      "tradeName" : "Test AG",
      "salutation" : null,
      "title" : null,
      "givenName" : null,
      "familyName" : null
    },
    "type" : "DEBITOR",
    "mark" : null,
    "contact" : {
      "uuid" : "74722eb7-48fd-431c-afaf-fb3a3a8b5f1c",
      "caption" : "Test AG - billing department",
      "postalAddress" : { },
      "emailAddresses" : {
        "main" : "billing@test-ag.example.org"
      },
      "phoneNumbers" : { }
    }
  },
  "debitorNumber" : "D-3101000",
  "debitorNumberSuffix" : "00",
  "partner" : {
    "uuid" : "ceaf680a-e52e-4625-b80f-fe70a66e6428", // Partner: P-31010 - Test AG
    "partnerNumber" : "P-31010",
    "partnerRel" : {
      "uuid" : "d8468486-cc0a-4797-b367-4c393953f190", // partnerRelationUuid
      "anchor" : {
        "uuid" : "bb7b76f1-1922-46aa-8c22-468c70c3a9fa", // Person: Hostsharing eG
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Hostsharing eG",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "holder" : {
        "uuid" : "1223603d-1a3b-4e0c-a244-027585d22eb2", // Person: Test AG
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Test AG",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "type" : "PARTNER",
      "mark" : null,
      "contact" : {
        "uuid" : "c9fdae44-bedc-4fb6-b5ad-f7016218fc25", // Contact: Test AG - China
        "caption" : "Test AG - China",
        "postalAddress" : {
          "country" : "China",
          "province" : "Guangdong Province",
          "city" : "Dongguan City",
          "street" : "No.2 Commercial Second Street",
          "district" : "Niushan Wei Wu",
          "department" : "Executive Board",
          "building" : "Thi Chi Koh Building"
        },
        "emailAddresses" : {
          "main" : "norden@test-ag.example.org"
        },
        "phoneNumbers" : {
          "phone" : "++15 999 654321"
        }
      }
    },
    "details" : {
      "uuid" : "c0e8a6b5-877b-4ced-a480-4edf988d3681",
      "registrationOffice" : "Registergericht Hamburg",
      "registrationNumber" : "1234567",
      "birthName" : null,
      "birthPlace" : null,
      "birthday" : null,
      "dateOfDeath" : null
    }
  },
  "billable" : true,
  "vatId" : "VAT123456",
  "vatCountryCode" : "DE",
  "vatBusiness" : true,
  "vatReverseCharge" : false,
  "refundBankAccount" : {
    "uuid" : "76f6a51a-9dff-4c0a-a4fd-5068e4ec40e5",
    "holder" : "Test AG - refund bank account",
    "iban" : "DE88100900001234567892",
    "bic" : "BEVODEBB"
  },
  "defaultPrefix" : "tst"
}

BankAccount: Test AG - debit bank account

HTTP POST "/api/hs/office/bankaccounts" \
  -H "Authorization: Bearer $HSADMINNG_JWT_BEARER" \
  `# {` \
  `#   "sub" : "uuid<hsh-alex_superuser>"` \
  `# }` \
  -H 'Content-Type: application/json' \
  --data-binary @- <<EOF
{
  "holder" : "Test AG - debit bank account",
  "iban" : "DE02701500000000594937",
  "bic" : "SSKMDEMM"
}
EOF
=> status: 201 CREATED 86a7c8d3-d25d-4314-917d-3f5da66e9fba

Create SEPA-Mandate: Test AG

HTTP POST "/api/hs/office/sepamandates" \
  -H "Authorization: Bearer $HSADMINNG_JWT_BEARER" \
  `# {` \
  `#   "sub" : "uuid<hsh-alex_superuser>"` \
  `# }` \
  -H 'Content-Type: application/json' \
  --data-binary @- <<EOF
{
  "debitor.uuid" : "23a905b2-1889-49e6-9ae8-499a678f15ae", // Debitor: D-3101000 - Test AG - main debitor
  "bankAccount.uuid" : "86a7c8d3-d25d-4314-917d-3f5da66e9fba", // BankAccount: Test AG - debit bank account
  "reference" : "Test AG - main debitor",
  "agreement" : "2022-10-12",
  "validFrom" : "2024-10-15"
}
EOF
=> status: 201 CREATED 5b9091af-340a-4f27-beb2-ec8c0487ee9b

generated on 2026-07-17 01:42:27 for branch